{% import "form_helpers.html" as form_helpers %}
<article itemscope itemtype="http://schema.org/Product">
    <heading>
        <h1>
            <a href="{{ item.url }}" itemprop="name">{{ item.title }}</a>
        </h1>
    </heading>
    {% if item.youtube %}
        <div>
        {{ item.youtube_rendered|safe }}
        </div>
    {% endif %}
    {% if item.image %}
        <div>
        <img src="{{ url_for('blob', key=item.image) }}" width="400em" height="400em">
        </div>
    {% endif %}
    <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <span class="badge badge-inverse" itemprop="price">{{ item.price }}</span>
    </span>
    {{ form_helpers.render_stars(item.average_rating|default(-1)|int, 5) }}
    {# <p>
        {{ _('Created') }}: <time class="timeago" datetime="{{ item.created.isoformat() }}Z">{{ item.created.ctime() }}</time>
    </p>#}
    <p itemprop="description">{{ item.description_rendered|safe }}</p>
    <div class="form-actions">
        <a href="{{ item.url }}" class="btn">{{ _('Details') }}</a>
        {# {% if current_user.get_id() != item.seller_id and current_user.is_authenticated() %}
            <a href="{{ url_for('message_send', to=item.seller.email, subject=item.key.id()) }}" class="btn btn-inverse">{{ _('Contact Seller') }}</a>
        {% endif %} #}
        <div class="pull-right">
            <div class="g-plus" data-action="share" data-annotation="none" data-height="28" data-href="{{ item.url }}"></div>
        </div>
    </div>
</article>
